import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "CommuntiyGroup/"
import { getBaseUrl } from "@/utils/appUrls.js"

// 获取团长统计数据信息
// export function getRegimentHeadStatData(data) {
//     return http.post({
//         url: getBaseUrl() + serviceName + "GetRegimentHeadStatData",
//         data
//     })
// }

// 获取提货点统计数据信息
export function getTakeDeliveryStatData(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetTakeDeliveryStatData",
        data,
    })
}

// 获取分拣单分页列表
export function getSortingPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetSortingPage",
        data,
    })
}

// 获取分拣单详情
export function getSortingInfo(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetSortingInfo",
        data,
    })
}

// export function getOrderDetail(data) {
//     return http.post({
//         url: getBaseUrl() + serviceName + "getOrderDetail?orderId=" + data.orderId
//     })
// }

// 获取分拣单关联订单分页列表
export function getSortingOrderPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetSortingOrderPage",
        data,
    })
}

// 分拣单发货
export function sortingSend(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SortingSend",
        data,
    })
}

// 分拣单收货
export function sortingReceipt(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SortingReceipt",
        data,
    })
}

// 分拣单核对签收
export function sortingSignFor(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SortingSignFor",
        data,
    })
}

// 分拣单完成
export function sortingComplete(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SortingComplete",
        data,
    })
}

// 通知用户订单可提货
export function orderTakeNotify(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderTakeNotify",
        data,
    })
}

// 订单提货完成(按订单ID)
export function orderTakeComplete(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderTakeComplete",
        data,
    })
}

// 订单提货完成(按订单号)
export function orderTakeCompleteBySn(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderTakeCompleteBySn",
        data,
    })
}

// 获得预计可提货时间
export function GetAppointmentDateTime(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAppointmentDateTime",
        data,
    })
}

// 获得预计可提货时间(小时数)
export function GetAppointmentHourNum(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAppointmentHourNum",
        data,
    })
}

// 获取分拣单物流信息
export function getSortingSendLog(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetSortingSendLog",
        data,
    })
}
//获取提货点关联订单分页列表
export function GetTakeDeliveryOrderPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetTakeDeliveryOrderPage",
        data,
    })
}
//确认提货
export function OrderTakeComplete(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderTakeComplete",
        data,
    })
}
